package com.lxy.api.client;


import com.lxy.api.domain.vo.CompletedRepairVO;
import com.lxy.api.domain.vo.RepairVO;
import com.lxy.common.domain.dto.MaintenanceScheduleDTO;
import com.lxy.common.domain.dto.MaintenanceUsersDTO;
import com.lxy.common.domain.po.Repair;
import com.lxy.common.domain.vo.AlertsVO;
import com.lxy.common.domain.vo.MaintenanceSchedulesVO;
import com.lxy.common.domain.vo.RobotVO;
import com.lxy.common.domain.common.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("equipment-service")
public interface EquipmentClient {
    @GetMapping("/equipment/getMyRepair")
    public R<List<RepairVO>> getMyRepair ();

    @GetMapping("/equipment/getMyCompletedRepair")
    public R<List<CompletedRepairVO>> getMyCompletedRepair();

    @PostMapping("/equipment/sendAlerts")
    public R sendAlerts(@RequestBody RobotVO robotVO);

    @GetMapping("/equipment/showAlerts")
    public R<List<AlertsVO>> showAlerts();

    @GetMapping("/equipment/alertUser")
    public R alertUser(@RequestParam("alertsId") Long alertsId, @RequestParam("userId") Long userId );

    @GetMapping("/equipment/changeRepairStatus")
    public R changeRepairStatus(@RequestParam("repairId") Long repairId);

    @PostMapping("/equipment/addMaintenanceSchedule")
    public R addMaintenanceSchedule(@RequestBody MaintenanceScheduleDTO maintenanceScheduleDTO);

    @PostMapping("/equipment/arrangementMaintenanceSchedule")
    public R arrangementMaintenanceSchedule(@RequestBody MaintenanceUsersDTO maintenanceUsersDTO);

    @GetMapping("/equipment/getAllMaintenanceSchedule")
    public R<List<MaintenanceSchedulesVO>> getAllMaintenanceSchedule();

    @PostMapping("/equipment/updateMaintenanceSchedule")
    public R updateMaintenanceSchedule(@RequestBody MaintenanceSchedulesVO maintenanceSchedulesVO);

    @GetMapping("/equipment/getMyMaintenanceSchedules")
    public R<List<MaintenanceSchedulesVO>> getMyMaintenanceSchedules(@RequestParam("userId") Long userId);

    @DeleteMapping("/equipment/deleteMaintenanceUsers")
    public R deleteMaintenanceUsers(@RequestBody MaintenanceUsersDTO maintenanceUsersDTO);

    @GetMapping("/equipment/deleteRepairUser")
    public R deleteRepairUser(@RequestParam("userId")Long userId);

    @GetMapping("/equipment/getAllRepair")
    R<List<Repair>> getAllRepair();
}
